import 'package:get/get.dart';
import 'create_group_view.dart';
import 'join_group_view.dart';
import 'join_group_logic.dart';
import 'qr_scanner_view.dart';
import '../group_member/group_member_view.dart';
import '../group_member/group_member_logic.dart';
import '../group_detail/group_detail_view.dart';
import '../group_detail/group_detail_logic.dart';

/// 群组模块路由配置
class GroupRoutes {
  /// 创建群组
  static const String createGroup = '/create-group';
  
  /// 加入群组
  static const String joinGroup = '/join-group';
  
  /// 二维码扫描
  static const String qrScanner = '/qr-scanner';
  
  /// 群组成员管理
  static const String groupMember = '/group-member';
  
  /// 群组详情
  static const String groupDetail = '/group-detail';

  static final List<GetPage> routes = [
    // 创建群组
    GetPage(
      name: createGroup,
      page: () => const CreateGroupPage(),
    ),
    
    // 加入群组
    GetPage(
      name: joinGroup,
      page: () => const JoinGroupView(),
      binding: BindingsBuilder(() {
        Get.lazyPut<JoinGroupLogic>(() => JoinGroupLogic());
      }),
    ),
    
    // 二维码扫描
    GetPage(
      name: qrScanner,
      page: () => const QRScannerView(),
    ),
    
    // 群组成员管理
    GetPage(
      name: groupMember,
      page: () => const GroupMemberView(),
      binding: BindingsBuilder(() {
        Get.lazyPut<GroupMemberLogic>(() => GroupMemberLogic());
      }),
    ),
    
    // 群组详情
    GetPage(
      name: groupDetail,
      page: () => const GroupDetailView(),
      binding: BindingsBuilder(() {
        Get.lazyPut<GroupDetailLogic>(() => GroupDetailLogic());
      }),
    ),
  ];
}
